package com.bwie.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 美术馆表
 * @TableName gallery
 */
@TableName(value ="gallery")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Gallery {
    /**
     * 美术馆id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 美术馆名称
     */
    private String name;

    /**
     * 基本信息
     */
    private String basic;

    /**
     * 参观需知
     */
    private String visitNoticeThat;

    /**
     * 开放时间
     */
    private Date strdatetime;

    private String url;

    /**
     * 闭馆时间
     */
    private Date enddatetime;

    private Integer num;

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Gallery(Integer num) {
        this.num = num;
    }

    /**
     * 美术馆id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 美术馆id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 美术馆名称
     */
    public String getName() {
        return name;
    }

    public String getUrl() {
        return url;
    }

    @Override
    public String toString() {
        return "Gallery{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", basic='" + basic + '\'' +
                ", visitNoticeThat='" + visitNoticeThat + '\'' +
                ", strdatetime=" + strdatetime +
                ", url='" + url + '\'' +
                ", enddatetime=" + enddatetime +
                '}';
    }

    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * 美术馆名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 基本信息
     */
    public String getBasic() {
        return basic;
    }

    public Gallery(Integer id, String name, String basic, String visitNoticeThat, Date strdatetime, String url, Date enddatetime) {
        this.id = id;
        this.name = name;
        this.basic = basic;
        this.visitNoticeThat = visitNoticeThat;
        this.strdatetime = strdatetime;
        this.url = url;
        this.enddatetime = enddatetime;
    }

    /**
     * 基本信息
     */
    public void setBasic(String basic) {
        this.basic = basic;
    }

    /**
     * 参观需知
     */
    public String getVisitNoticeThat() {
        return visitNoticeThat;
    }

    /**
     * 参观需知
     */
    public void setVisitNoticeThat(String visitNoticeThat) {
        this.visitNoticeThat = visitNoticeThat;
    }

    /**
     * 开放时间
     */
    public Date getStrdatetime() {
        return strdatetime;
    }

    /**
     * 开放时间
     */
    public void setStrdatetime(Date strdatetime) {
        this.strdatetime = strdatetime;
    }

    /**
     * 闭馆时间
     */
    public Date getEnddatetime() {
        return enddatetime;
    }

    /**
     * 闭馆时间
     */
    public void setEnddatetime(Date enddatetime) {
        this.enddatetime = enddatetime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Gallery other = (Gallery) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getBasic() == null ? other.getBasic() == null : this.getBasic().equals(other.getBasic()))
            && (this.getVisitNoticeThat() == null ? other.getVisitNoticeThat() == null : this.getVisitNoticeThat().equals(other.getVisitNoticeThat()))
            && (this.getStrdatetime() == null ? other.getStrdatetime() == null : this.getStrdatetime().equals(other.getStrdatetime()))
            && (this.getEnddatetime() == null ? other.getEnddatetime() == null : this.getEnddatetime().equals(other.getEnddatetime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getBasic() == null) ? 0 : getBasic().hashCode());
        result = prime * result + ((getVisitNoticeThat() == null) ? 0 : getVisitNoticeThat().hashCode());
        result = prime * result + ((getStrdatetime() == null) ? 0 : getStrdatetime().hashCode());
        result = prime * result + ((getEnddatetime() == null) ? 0 : getEnddatetime().hashCode());
        return result;
    }

}